﻿<script type="text/javascript">
    $(function() {
        $("#banhezhan_yuebaobiao_chaxun").click(function() {
            //查询
            var zhanDanStr = $("#banhezhan_yuebaobiao_zhandian").combobox('getValue');
            var dateKaiShi = $("#banhezhan_yuebaobiao_kaishi").combobox('getValue');
            var dateJieShu = $("#banhezhan_yuebaobiao_jieshu").combobox('getValue');
            var dateNian = $("#banhezhan_yuebaobiao_nian").combobox('getValue');
            $("#banhezhan_yuebaobiao").datagrid("load", { zhandian: zhanDanStr, kaishishijian: dateKaiShi, jieshushijian: dateJieShu, nian: dateNian, uid: window.uid, kid: window.kid });
        });
        $("#banhezhan_yuebaobiao_daochu").click(function() {
            //导出
        });
        $("#banhezhan_yuebaobiao_zhandian").combobox({
            url: 'json/zhandian.json',
            method: 'get',
            valueField: 'zhandian',
            textField: 'zhandian',
            panelWidth: 150,
            panelHeight: 'auto',
            editable: false,
            onLoadSuccess: function() {
                $("#banhezhan_yuebaobiao").datagrid({ url: "handler/banhezhanyuebao.ashx", method: "get", queryParams: { zhandian: $('#banhezhan_yuebaobiao_zhandian').combobox('getValue'), kaishishijian: $("#banhezhan_yuebaobiao_kaishi").combobox('getValue'), jieshushijian: $("#banhezhan_yuebaobiao_jieshu").combobox('getValue'), nian: $("#banhezhan_yuebaobiao_nian").combobox('getValue'), uid: window.uid, kid: window.kid } });
            }
        });

        $("#banhezhan_yuebaobiao_kaishi").combobox({
            onLoadSuccess: function() {
                var m = new Date().getMonth() + 1;
                $("#banhezhan_yuebaobiao_kaishi").combobox('setValue', m);
            }
        });

        $("#banhezhan_yuebaobiao_jieshu").combobox({
            onLoadSuccess: function() {
                var m = new Date().getMonth() + 1;
                $("#banhezhan_yuebaobiao_jieshu").combobox('setValue', m);
            }
        });

    });
</script>

<div class="easyui-panel" data-options="height:90,border:false" title="数据检索" style="border-top-width: 0px;
    border-bottom-width: 1px; padding: 15px">
    <table style="font-size: 12px;">
        <tr>
          <td>
                站点：
            </td>
            <td>
                <input class="" name="banhezhan_yuebaobiao_zhandian" id="banhezhan_yuebaobiao_zhandian" style="width: 150px;" />
            </td>
            <td>
                年份：
            </td>
            <td>
                <input id="banhezhan_yuebaobiao_nian" type="text" class="easyui-combobox" data-options="required:true,valueField:'id',textField:'text',data:[{'id':2016,'text':'2016','selected':true},{'id':2017,'text':'2017'},{'id':2018,'text':'2018'},{'id':2019,'text':'2019'},{'id':2020,'text':'2020'}],panelHeight:100"
                    style="width:100px">
            </td>
            <td>月份：</td>
            <td>  <input id="banhezhan_yuebaobiao_kaishi" type="text" class="" data-options="required:true,valueField:'id',textField:'text',data:[{'id':1,'text':'1月'},{'id':2,'text':'2月'},{'id':3,'text':'3月'},{'id':4,'text':'4月'},{'id':5,'text':'5月'},{'id':6,'text':'6月'},{'id':7,'text':'7月'},{'id':8,'text':'8月'},{'id':9,'text':'9月'},{'id':10,'text':'10月'},{'id':11,'text':'11月'},{'id':12,'text':'12月'}]"
                    style="width:70px"></td>
            <td>
                至
            </td>
            <td>
                <input id="banhezhan_yuebaobiao_jieshu" type="text" class="easyui-combobox" data-options="required:true,valueField:'id',textField:'text',data:[{'id':1,'text':'1月'},{'id':2,'text':'2月'},{'id':3,'text':'3月'},{'id':4,'text':'4月'},{'id':5,'text':'5月'},{'id':6,'text':'6月'},{'id':7,'text':'7月'},{'id':8,'text':'8月'},{'id':9,'text':'9月'},{'id':10,'text':'10月'},{'id':11,'text':'11月'},{'id':12,'text':'12月'}]"
                    style="width: 70px">
            </td>
            <td>
                <a id="banhezhan_yuebaobiao_chaxun" class="easyui-linkbutton" data-options="iconCls:'icon-search'"
                    style="width: 60px; margin-left: 20px;">查询</a>
            </td>
            <td>
                <a id="banhezhan_yuebaobiao_daochu" class="easyui-linkbutton" data-options="iconCls:'icon-export-16'"
                    style="width: 60px">导出</a>
            </td>
        </tr>
    </table>
</div>
<table id="banhezhan_yuebaobiao" class="easyui-datagrid" title="拌合站生产月报表" data-options="border:false,singleSelect:true,collapsible:false,striped:true,fitColumns:true">
    <thead>
        <tr>
            <th data-options="field:'yuefen',width:90">
                月份
            </th>
            <th data-options="field:'gl1',width:130,align:'right'">
               0mm-5mm(吨)
            </th>
            <th data-options="field:'gl2',width:130,align:'right'">
               5mm-10mm(吨)
            </th>
            <th data-options="field:'gl3',width:130,align:'right'">
              10mm-20mm(吨)
            </th>
            <th data-options="field:'gl4',width:130,align:'right'">
               20mm-30mm(吨)
            </th>
            <!--<th data-options="field:'gl5',width:90,align:'right'">
                备仓(吨)
            </th>-->
            <th data-options="field:'fl',width:90,align:'right'">
                粉料(吨)
            </th>
            <th data-options="field:'shui',width:90,align:'right'">
                水(吨)
            </th>
            <th data-options="field:'hanshuizongzhong',width:120">
                含水总重(吨)
            </th>
             <th data-options="field:'buhanshuizongzhong',width:120">
                不含水总重(吨)
            </th>
            </tr>
    </thead>
</table>
